CREATE TABLE [dbo].[TCREND_ANIN]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_REND_GAST] [dbo].[TD_VC_010] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[FE_REND_GAST] [dbo].[TD_DT_001] NOT NULL,
[NU_PROC] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TCREND_AN__NU_PR__4A4E069C] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TCREND_AN__CO_US__4B422AD5] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TCREND_AN__FE_US__4C364F0E] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TCREND_AN__CO_US__4D2A7347] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TCREND_AN__FE_US__4E1E9780] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCREND_ANIN] ADD CONSTRAINT [PK__TCREND_A__F2751F7A3D09E56E] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_REND_GAST], [CO_UNID_CONC], [FE_REND_GAST], [NU_PROC]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCREND_ANIN] ADD CONSTRAINT [FK__TCREND_ANIN__14B1DB51] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [NU_REND_GAST], [FE_REND_GAST]) REFERENCES [dbo].[TCREND_ANUL] ([CO_EMPR], [CO_UNID_CONC], [NU_REND_GAST], [FE_REND_GAST])
GO
